#include <map>
#include "key_map.h"

std::map<char, int> key_map__ = {
    {'q', 1},
    {'w', 2},
    {'e', 3},
    {'r', 4},
    {'t', 5},
    {'y', 6},
    {'u', 7},
    {'i', 8},
    {'o', 9},
    {'p', 10},
    {'a', 11},
    {'s', 12},
    {'d', 13},
    {'f', 14},
    {'g', 15},
    {'h', 16},
    {'j', 17},
    {'k', 18},
    {'l', 19},
    {'z', 20},
    {'x', 21},
    {'c', 22},
    {'v', 23},
    {'b', 24},
    {'n', 25},
    {'m', 26}};

int key_map(char ch)
{
    if ('A' <= ch && ch <= 'Z')
        ch = ch - 'A' + 'a';
    return key_map__[ch];
}